<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>信息注册——新</title>
	</head>
	<script>
		var isPEWOk=false;
	         var isNameOk=false;
	         var isREPEWOk=false;
	         var isPEWOk=false;
		function focusObj(id) {
	    	id.style.backgroundColor="#FFCC80"
	        }
		function blurUser (id) {
	    	 var user=id.value;
	    	 if (user=="") {
	    	 	userDiv.innerHTML="账号不能为空"
	    	 	return false;
	    	 }
	    	 for (var i=0;i<user.length;i++) {
	    	 	var j=user.substring(i,i+1)
	    	 if (j==" ") {
	    	 	userDiv.innerHTML="账号不能包含空格"
	    	 	return false}
	    	 }
	    	 id.style.backgroundColor="#FFF"
	    	 userDiv.innerHTML=""
	    	 isNameOk=true
	    	 return true;
	    }
		function blurPwd (id) {
	    	 var pwd=id.value;
	    	 var pwdDiv=document.getElementById("pwdDiv")
	    	 if (pwd=="") {
	    	 	pwdDiv.innerHTML="密码不能为空"
	    	 	return false;
	    	 }
	    	 if (pwd.length<6) {
	    	 	pwdDiv.innerHTML="密码长度不能少于6位"
	    	 	return false
	    	 }
	    	 id.style.backgroundColor="#FFF"
	    	 pwdDiv.innerHTML=""
	    	 isPEWOk=true;
	    	 return true;
	   }
			function isReady () {
	    	//如果所有控件都验证通过，则允许提交
	    	if(isNameOk&&isPEWOk&&isREPEWOk)
	    	{
	    		return true;
	    	}
	    	else{
	    		return false;
	    	}
	   }
	</script>
	<body background="img/2.jpg"><form action=""method="post"  style="font-size: small;">
		<h3><table  align="center" cellspacing="0" border="0px" 
			cellpadding="0"width="35%" height=auto>
			<div align="center" style="font-size: medium;">新用户注册</div>
			<tr align="center"height="70px">
				<td  width="15%">
					账号：
				</td>
				<td width="35%">		
					<input type="text" id="txtid" name="txtid" onfocus="focusObj(this)" onblur="blurUser(this)"/><div id="userDiv"></div>
				</td>
			</tr>
			<tr align="center"height="70px">
				<td  width="15%">
					密码：
				</td>
				<td width="35%">		
					<input type="password" id="txtpwd" name="txtpwd" onfocus="focusObj(this)" onblur="blurPwd(this)"/><div id="pwdDiv"></div>
				</td>
			</tr>
			<tr align="center"height="70px">
				<td  width="15%">
					姓名：
				</td>
				<td width="35%">		
					<input type="text" id="txtName" name="txtName"/>
				</td>
			</tr>
			<tr align="center"height="70px">
				<td>
					电话：
				</td>
				<td>
					<input type="text" id="txtPhone" name="txtPhone"/>
				</td>
			<tr align="center" height="70px">
				<td>
					邮箱：
				</td>
				<td>
					<input type="text" id="txtmailbox" name="txtmailbox"/>
				</td>
			</tr>
		</tr>
			<tr align="center"height="70px">
				<td colspan="2">
					
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" id="btnSubMit" name="btnSubMit" value="注册" />
				</td>
				<td colspan="2">
					
					<input type="reset" id="btnReset" name="btnReset" value="取消" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
				</td>
			</tr>
		
		</table>

		
	</body>
<ml>
